package com.yinwq.springcloud.controller;

import com.yinwq.springcloud.entities.CommonResult;
import com.yinwq.springcloud.entities.Payment;
import com.yinwq.springcloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: yinwenqiang@qccr.com
 * @date: Created in 2021/6/13 14:46
 */
@RestController
public class OrderOpenFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult<Payment> get(@PathVariable("id") Long id) {
        return paymentFeignService.get(id);
    }

    @GetMapping(value = "/consumer/payment/openfeign/timeout")
    public String timeout() {
        return paymentFeignService.timeout();
    }
}
